﻿@{
    ViewBag.Title = "EditableListWidget";
    Layout = "~/Views/Shared/_Page.cshtml";
}

<link rel="stylesheet" href="/JsLib/zeus/ui/zeus.ui.editlist.css" type="text/css" />
<script src="/JsLib/zeus/ui/zeus.editListWidget.js" type="text/javascript"></script>

<h2>Editable List Widget</h2>

<div id="testBox"></div>

<script type="text/javascript">
    // mock data
    function initSelectData() {
        var selectList = [];
        for (var i = 0; i < 12; i++) {
            var obj = new Object();
            obj.name = "ListItem" + i;
            selectList.push(obj);
        }

        return selectList;
    }

    $(document).ready(function () {
        var selectItemData = initSelectData();

        $("#testBox").editListWidget({
            edtTextId: "editText",
            edtSelId: "editSelect",
            dataSource: selectItemData,
            pageIndex: 1,
            pageNum: 5
        });
    });
</script>